package jtk.project4.fleet.field;

import jtk.project4.fleet.domain.Employee;
import nl.coderight.jazz.form.FormLayout;
import nl.coderight.jazz.form.FormLayout.Resize;
import nl.coderight.jazz.form.control.GroupControl;
import nl.coderight.jazz.form.field.TextField;

public class EmployeeContactPhonesNumberEmailField extends GroupControl<Employee>{
	private TextField numberHome;
	private TextField numberCell;
	private TextField numberPager;
	private TextField notesEmail;
	
	
	
	
	public EmployeeContactPhonesNumberEmailField(String bindID){
		setTitle("Phones Number / Email");
		setBindID(bindID);
		createFields();
		createLayout();
	}
	
	private void createFields(){
		numberHome = new TextField ("phone1", 15);
		//numberHome.setRequired(true);
		
		numberCell = new TextField ("phone2", 15);
		//numberCell.setRequired(true);
		
		numberPager = new TextField ("pager", 15);
		//numberPager.setRequired(true);
		
		notesEmail = new TextField ("email", 25);
		//notesEmail.setRequired(true);
				
	
		
		
	}
	
	private void createLayout() {
		setLayout(new FormLayout())
		.addLabel("label.home").addField(numberHome)
		.addLabel("label.pager").addField(numberPager,Resize.HORIZONTAL)
		.addRow()
		.addLabel("label.cell").addField(numberCell)		
		.addLabel("label.email").addField(notesEmail,Resize.HORIZONTAL);
	}

}
